<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp" %>
	<script type="text/javascript">
		$(function(){
			$("#form1").validate({
				rules : {
					'name' : {
						required : true
					},
					'code' : {
						required : true
					}
				}
			});
		});
		function mySubmit() {
			$("#form1").submit();
		}
		function del(){
			if(confirm("确认要删除吗？")){
				var url = "${path}/ix/location/del.htm";
				$("#form1").attr("action",url);
				$("#form1").submit();
			}
		}
	</script>

	<!-- 内容 -->
	<div>
		<form method="post" action="${path}/ix/location/edit.htm" id="form1">
			<input name='id' value='${location._id}' type="hidden"/>
			<h2>
				<div>
					修改区域
				</div>
			</h2>
			<table width="99.6%" class="lindex">
				<tr>
					<th align="right">
						地区代码：
					</th>
					<td align="left" colspan="3">
						<input name="code" value="${location.code }" type="text" maxlength="100" />
					</td>
				</tr>
				<tr>
					<th align="right">
						区域名称：
					</th>
					<td align="left" colspan="3">
						<input name="name" value="${location.name }" type="text" maxlength="100" />
					</td>
				</tr>
				<tr>
					<td colspan="4">
						<a href="javascript:mySubmit();">【保存】</a> 
						<a href="javascript:add('${location._id}');">【增加子部门(+)】</a> 
						<a href="javascript:del()">【删 除】</a>		
					</td>
				</tr>
			</table>
			
		</form>
	</div>
